<?php
//require_once 'Controller/EventosController.php';
//require_once 'Controller/CadastroEventoController.php';
?>
<!DOCTYPE html>
<html>
    <head>
        <? require_once 'header.php'; ?>
        <script>
            var cont = 2;
            function lotes() {
                document.getElementById("container").innerHTML +=
                        "<div class = 'control-group'>" +
                        "<label class = 'control-label' for = 'edtLotesMasc" + cont + "'> Ingressos Lote " + cont + " </label>" +
                        "<div class = 'controls'>" +
                        "<input class = 'input-small' type = 'number' id = 'edtLotesMasc" + cont + "'name='edtLotesMas[]' ' placeholder = 'Valor Masc.'>" +
                        "<input class = 'input-small' type = 'number' id = 'edtLotesFem" + cont + "' name='edtLotesFem[]'  placeholder = 'Valor Fem.'>" +
                        "<input class = 'input-small' type = 'number' id = 'edtQuantidadeLote" + cont + "' name='edtQuantidade[]'  placeholder = 'Quantidade'>" +
                        "<a href = 'javascript: lotes()' < i class = 'icon-plus-sign'> </i></a>" +
                        "</div>" +
                        "</div>";
                cont++;
            }
        </script>       
    </head>
    <body>
        <?php
        getNavbar();
        ?>
        <div class="container-fluid" style="margin-top: 60px;">
            <div class="row-fluid">
                <div class="span3 container">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <a class="brand">Republica</a>
                        </div>
                        <div class="container well">
                            <h3 style="margin: 0px;"><?php echo $this->getRepublica()->getNome(); ?></h3>
                            <? echo '<img class="img-polaroid span12" style="margin: 0px;" src="/img/' . ($this->getRepublica()->getImagemPrincipal()->getImagem()) . '" alt="photo"><br>'; ?>
                            <!--<img class="img-polaroid" src="./Controller/getImagemController.php/?id=<? //echo $empresa->getCodigo();                ?>" />-->
                            <p>
                            <address>
                                <?php  echo $this->getRepublica()->getEndereco()->getDescricao(); ?><br>
                                <?php echo $this->getRepublica()->getCidade()->getNome() . ", " . $this->getRepublica()->getCidade()->getEstado()->getNome() . "." ?><br>
                                <abbr title="Telefone">Tel:</abbr> (123) 456-7890<br>
                            </address>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="span6 container">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <a class="brand">Cadastrar Evento da Republica</a>
                        </div>
                        <div class="container well">
                            <form class="form-horizontal" method="POST" action="" enctype="multipart/form-data">
                                <input type="hidden" id="formCadastroEventoRepublica" name="formCadastroEventoRepublica" value="formCadastroEventoRepublica"/>
                                <input type="hidden" id="codRepublica" name="codRepublica" value="<? echo $this->getRepublica()->getCodigo(); ?>"/>
                                <div class="control-group">
                                    <label class="control-label" for="edtNomeEvento">Nome do evento</label>
                                    <div class="controls">
                                        <input type="text" id="edtNomeEvento" name="edtNomeEvento" placeholder="Nome do evento" required>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="edtDescricaoEvento">Descrição do Evento</label>
                                    <div class="controls">
                                        <textarea class="text-left" name="edtDescricaoEvento" rows="4" cols="50" placeholder="Descrição" required></textarea>
                                    </div>                                        
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="edtImagemEvento">Imagem Principal</label>
                                    <div class="controls">
                                        <input type="file" id="edtImagemEvento" name="edtImagemEvento">
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="edtImagensEvento">Outras Imagens</label>
                                    <div class="controls">
                                        <input type="file" multiple="multiple" id="edtImagensEvento" name="edtImagensEvento[]">
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="edtData">Data</label>
                                    <div class="controls">
                                        <input type="date" id="edtData" name="edtData" placeholder="Data" required>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="edtHoraInicio">Horário inicio</label>
                                    <div class="controls">
                                        <input type="time" id="edtHoraInicio" name="edtHoraInicio" required>
                                    </div>
                                    <label class="control-label" for="edtHoraFim">Horário fim</label>
                                    <div class="controls">
                                        <input type="time" id="edtHoraFim" name="edtHoraFim" required>
                                    </div>
                                </div>
                                <div id="container">
                                    <div class="control-group">
                                        <label class="control-label" for="edtLotesMas1">Ingressos Lote 1</label>
                                        <div class="controls">
                                            <input class="input-small" type="number" id="edtLotesMas1" name="edtLotesMas[]" placeholder="Valor Masc."><input class="input-small" type="number" id="edtLotesFem1" name="edtLotesFem[]" placeholder="Valor Fem." required><input class="input-small" type="number" id="edtQuantidadeLote1" name="edtQuantidadeLote[]" placeholder="Quantidade" required><a href="javascript: lotes()"<i class="icon-plus-sign"> </i></a>
                                        </div>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <div class="controls">
                                        <button type="submit" class="btn">Cadastrar</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="span3 container">
                    <div class="navbar">
                        <div class="navbar-inner">
                            <a class="brand" href="">Outros Eventos</a>
                        </div>
                        <div class="container well">
                            <? //getEventosVertical(); ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?
        require_once 'footer.php';
        ?>
    </body>
</html>
<?
?>